<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>会议添加</title>
    <?php require 'templates/common/head.html'; ?>
    <link href="../business/resource/css/hermes.css" rel="stylesheet">
    <link href="../business/resource/js/calendar/calendar-blue.css" type="text/css" rel="stylesheet">
    <script src="../business/resource/js/calendar/calendar.js" type="text/javascript"></script>
    <script src="../business/resource/js/hermes.js"></script>
    <style type="text/css">
       .form_d{
           width:500px;
           margin: 20px auto;
       }
    </style>
</head>
<body>

<div class="container-fluid">
    <?php require 'templates/common/nav.html'; ?>
    <div class="panel panel-primary">
        <div class="panel-heading text-center"><h3 class="panel-title"><?php if(isset($huiyi_one))echo "编辑";else echo "添加";?>会议</h3></div>
        <?php  if(!$huiyi_one):?>
        <div class="form_d">
            <form action="" method="post">
                您的姓名(讨论组群主）:<input type="text" name="name" id="namese" style="width: 120px">
                <input type="button" onclick="selectshow()" name="select" value="搜索用户">
            </form>
        </div>
        <div class="form_d"><span style="width: 180px">用   户:</span>
            <div id="xianshi">
                    <input type="radio" checked="checked" value="<?=$huiyi_one['操作人id']?>" name="专家id"> <?=$huiyi_one['name']?>
            </div>

            <?php  endif;?>


            <form action="" method="post" enctype="multipart/form-data">
            <div class="form_d">
                <input type="hidden" value="<?=@$huiyi_one['操作人id']?>" id="autor" name="操作人id">
                <input name="id" value="<?=@$huiyi_one['id']?>" type="hidden">
                <input name="图片" value="<?=@$huiyi_one['图片log']?>" type="hidden">
                <div class="form_d"><span>会议名称:</span>
                    <textarea rows="1" cols="40" name="title"><?=$huiyi_one['name']?></textarea>
                       </div>
                <div class="form_d"><span>会议时间:</span><input style="width: 80%;" type="text" name="会议时间" value="<?=@$huiyi_one['会议时间']?>"></div>
            <div class="form_d"><span>会议地点:</span><textarea style="width: 80%;" type="text" name="会议地点" value=""><?=@$huiyi_one['会议地点']?></textarea></div>
                <div class="form_d"><span>主办单位:</span><input style="width: 80%;" type="text" name="主办单位" value="<?=@$huiyi_one['主办单位']?>"></div>
                <div class="form_d"><span>会议主页面:</span><input style="width: 80%;" type="text" name="下一步" value="<?=@$huiyi_one['下一步']?>"></div>
                <div class="form_d"><span>最多报名人数:</span><input style="width: 80%;" type="text" name="max_register" value="<?=@$huiyi_one['max_register']?>"></div>
                <div class="form_d"><span>状态:</span>
                <select name="状态">
                    <?php if($huiyi_one['状态']=='发布'):?>
                    <option >待发布</option><option selected>发布</option>
                    <?php else: ?>
                    <option selected>待发布</option><option >发布</option>
                    <?php endif ?>
                </select>


                </div>
                <?php if($huiyi_one['is_create_group']==0||(!isset($huiyi_one['is_create_group']))){?>
                <div class="form_d"> <input  type="checkbox" name="is_create_group" value="1">建会议线上讨论组</div>
            <?php   }?>

                <div class="form_d"><span>上传会议列表图片:
                    <?php if(!empty($huiyi_one['图片log'])):?>
                    <img src="<?=G_SITE_BASE?>/<?=$huiyi_one['图片log']?>" width="50" height="50">
                    <?php endif;?>
                    <input style="width: 80%;" type="file" name="pic"></span></div>

                <div class="form_d"><span>会议报名路径:</span><!-- 加载编辑器的容器 -->
                    <textarea rows="2" cols="30" name ="会议报名" placeholder=""><?=$huiyi_one['会议报名']?></textarea>
                </div>

                <div class="form_d"><span>消息头:</span><!-- 加载编辑器的容器 -->
                    <textarea rows="2" cols="40" name ="news_first" placeholder=""><?=$huiyi_one['news_first']?></textarea>
                </div>

                <div class="form_d"><span>消息尾:</span><!-- 加载编辑器的容器 -->
                    <textarea rows="2" cols="40" name ="news_remark" placeholder=""><?=$huiyi_one['news_remark']?></textarea>
                </div>

                <div class="form_d"><span>直播时间:</span><!-- 加载编辑器的容器 -->
                    <textarea rows="2" cols="40" name ="live_video_time" placeholder=""><?=$huiyi_one['live_video_time']?></textarea>
                </div>

                <div class="form_d"><span>消息图片:
                    <?php if(!empty($huiyi_one['new_pic_url'])):?>
                    <img src="<?=G_SITE_BASE?>/<?=$huiyi_one['new_pic_url']?>" width="50" height="50">
                    <?php endif;?>
                    <input style="width: 80%;" type="file" name="new_pic_url"></span>
                </div>

                <div class="form_d"><span>直播连接:</span><!-- 加载编辑器的容器 -->
                    <textarea rows="2" cols="40" name ="news_url" placeholder=""><?=$huiyi_one['news_url']?></textarea>
                </div>
               <!--
                <div class="form_d"><span>子栏目(用-隔开):</span>
                    <textarea rows="3" cols="30" name ="子栏目"  placeholder="会议报名-会议简介-专家简介-会议群"><?=$huiyi_one['子栏目']?></textarea>
                </div>
               <div class="form_d"><span>会议简介路径:</span>
                    <textarea rows="2" cols="30" name ="会议简介" placeholder="选填"><?=$huiyi_one['会议简介']?></textarea>
                </div>
                <div class="form_d"><span>专家简介路径:</span>
                    <textarea rows="2" cols="30" name ="专家简介" placeholder="选填"><?=$huiyi_one['专家简介']?></textarea>
                </div>
                <div class="form_d"><span>会议议程路径:</span>
                    <textarea rows="2" cols="30" name ="会议议程" placeholder="如会议课程安排"><?=$huiyi_one['会议议程']?></textarea>
                </div>

               -->
                </div>
            <div class="form_d"><input id="tijiao" type="submit" name="okn" value="提交"> </div>
        </form>

</div>
    </div>

</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="../business/resource/js/jquery-1.11.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="../business/resource/js/bootstrap.min.js"></script>

</body>
</html>
<script src="../business/resource/js/jquery-1.11.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="../business/resource/js/bootstrap.min.js"></script>
<script language="JavaScript">
    function selectshow(){
        var name= document.getElementById("namese").value;
        $.post('index.php?m=video_course&a=find_user',{name:name,'businessFlag':'ac查找用户'},function(data) {
            document.getElementById('xianshi').innerHTML='';
            document.getElementById("xianshi").innerHTML=data;

        });

    }
    $(function(){
//    $("#fasong").click(function(){
//        $(this).attr('hidden',true);
//    });
//    $("#fasong2").click(function(){
//        $(this).attr('hidden',true);
//    });


        $("#tijiao").click(function(){
            var q= $('input[name="专家id"]:checked').val();
            if(q.length!=0){
                $('#autor').val(q);
            }

            $(this).attr('hidden',true);
        });
    })

</script>
